package com.clearliang.mobframe.utils;

import com.mob.paysdk.AliPayAPI;
import com.mob.paysdk.OnPayListener;
import com.mob.paysdk.PayOrder;
import com.mob.paysdk.PaySDK;
import com.mob.paysdk.UnionPayAPI;
import com.mob.paysdk.WXPayAPI;

/**
 * Created by ClearLiang on 2019/1/17
 * <p>
 * Function :
 */
public class PayUtil {
    public static void getAliPay(PayOrder order,OnPayListener<PayOrder> orderOnPayListener){
        AliPayAPI payAPI = PaySDK.createMobPayAPI(AliPayAPI.class);
        payAPI.pay(order, orderOnPayListener);
    }

    public static void getWxPay(PayOrder order,OnPayListener<PayOrder> orderOnPayListener){
        WXPayAPI payAPI = PaySDK.createMobPayAPI(WXPayAPI.class);
        payAPI.pay(order, orderOnPayListener);
    }

    public static void getUnionPay(PayOrder order,OnPayListener<PayOrder> orderOnPayListener){
        UnionPayAPI payAPI = PaySDK.createMobPayAPI(UnionPayAPI.class);
        payAPI.pay(order, orderOnPayListener);
    }
}
